<%= stylesheet_link_tag 'sidebar'%>

<div class="sidebar pull-left width-24">
  <div class="search sidebar-section">
    <%= form_tag('/posts/search', method: 'get') do %>
      <div class="section-title">Search</div>
      <%= text_field_tag(:keyword, '', class: 'keyword') %>
      <%= submit_tag('Search', class: 'search button') %>
    <% end %>
  </div>

  <div class="dilimiter"></div>

  <div class="sidebar-section">
    <div class="section-title">Tags</div>
    <div class="tags">

    <% @tags.each do |tag| %>
      <%= link_to "#{tag[0]}(#{tag[1]})", search_by_tag_posts_path(tag[0]), class: 'tag' %>
    <% end %>

    </div>
  </div>
</div>

